import http from './http'

// 登录
export const login = (data: any) => {
    return http.post('/api/login', data)
}

// 账号列表
export const accountList = (data: any) => {
    return http.post('/api/account/list', data)
}
// 账号新增
export const addAccount = (data: any) => {
    return http.post('/api/account/add', data)
}
// 账号信息查询
export const accountInfo = (id: any) => {
    return http.get(`/api/account/info?id=${id}`)
}
// 账号更新 
export const updateAccount = (data: any) => {
    return http.post('/api/account/update', data)
}
// 账号删除
export const delAccount = (id: any) => {
    return http.post(`/api/account/delete`, { id })
}
// 批量账号删除
export const delMultipleAccount = (data: any) => {
    return http.post(`/api/account/delete/multiple`, data)
}

// 角色新增
export const addRole = (data: any) => {
    return http.post('/api/account/add', data)
}